﻿using Abp.Domain.Entities.Auditing;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using SingleUserMall.Authorization.Users;

namespace SingleUserMall.Stores
{
    /// <summary>
    /// 店铺结算记录
    /// </summary>
    public class StoreBalanceRecord : FullAuditedEntity<long>
    {
        /// <summary>
        /// 店铺id
        /// </summary>
        public int StoreId { get; set; }
        [ForeignKey("StoreId")]
        public virtual Store Store { get; set; }
        /// <summary>
        /// 申请人id
        /// </summary>
        public long UserId { get; set; }
        /// <summary>
        /// 结算金额
        /// </summary>
        public decimal BalanceAmount { get; set; }
        /// <summary>
        /// 申请状态
        /// </summary>
        public BalanceStatus BalanceStatus { get; set; }
        /// <summary>
        /// 审核人姓名
        /// </summary>
        public string ApproveUserName { get; set; }
    }

    public enum BalanceStatus
    {
        /// <summary>
        /// 申请中
        /// </summary>
        [Description("申请中")]
        Wait = 0,
        /// <summary>
        /// 驳回
        /// </summary>
        [Description("驳回")]
        Fail = -1,
        /// <summary>
        /// 通过
        /// </summary>
        [Description("通过")]
        Pass = 1
    }
}
